﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 客户管理基础输入参数
/// </summary>
public class CustomermanagementBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 客户编码
    /// </summary>
    public virtual string? CustomerCode { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public virtual string? CustomerName { get; set; }
    
    /// <summary>
    /// 行业
    /// </summary>
    public virtual long? Industry { get; set; }
    
    /// <summary>
    /// 客户来源
    /// </summary>
    public virtual long? CustomerSourceId { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public virtual string? Contact { get; set; }
    
    /// <summary>
    /// 联系电话
    /// </summary>
    public virtual string? ContactNumber { get; set; }
    
    /// <summary>
    /// 电子邮箱
    /// </summary>
    public virtual string? Email { get; set; }
    
    /// <summary>
    /// 销售部门
    /// </summary>
    public virtual long? OrganizationId { get; set; }
    
    /// <summary>
    /// 销售人员
    /// </summary>
    public virtual long? UserManagementId { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public virtual bool? State { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>
    public virtual string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 账户名称
    /// </summary>
    public virtual string? AccountName { get; set; }
    
    /// <summary>
    /// 纳税人识别号
    /// </summary>
    public virtual string? TaxpayerIdentificationNumber { get; set; }
    
    /// <summary>
    /// 银行账户
    /// </summary>
    public virtual string? BankAccount { get; set; }
    
    /// <summary>
    /// 开户银行
    /// </summary>
    public virtual string? BankDeposit { get; set; }
    
    /// <summary>
    /// 开户行地址
    /// </summary>
    public virtual string? BankDepositAddrs { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public virtual string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 客户管理分页查询输入参数
/// </summary>
public class PageCustomermanagementInput : BasePageInput
{
    /// <summary>
    /// 客户编码
    /// </summary>
    public string? CustomerCode { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 行业
    /// </summary>
    public long? Industry { get; set; }
    
    /// <summary>
    /// 客户来源
    /// </summary>
    public long? CustomerSourceId { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系电话
    /// </summary>
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 电子邮箱
    /// </summary>
    public string? Email { get; set; }
    
    /// <summary>
    /// 销售部门
    /// </summary>
    public long? OrganizationId { get; set; }
    
    /// <summary>
    /// 销售人员
    /// </summary>
    public long? UserManagementId { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? State { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>
    public string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 账户名称
    /// </summary>
    public string? AccountName { get; set; }
    
    /// <summary>
    /// 纳税人识别号
    /// </summary>
    public string? TaxpayerIdentificationNumber { get; set; }
    
    /// <summary>
    /// 银行账户
    /// </summary>
    public string? BankAccount { get; set; }
    
    /// <summary>
    /// 开户银行
    /// </summary>
    public string? BankDeposit { get; set; }
    
    /// <summary>
    /// 开户行地址
    /// </summary>
    public string? BankDepositAddrs { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 客户管理增加输入参数
/// </summary>
public class AddCustomermanagementInput
{
    /// <summary>
    /// 客户编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户编码字符长度不能超过32")]
    public string? CustomerCode { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "客户名称字符长度不能超过32")]
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 行业
    /// </summary>
    public long? Industry { get; set; }
    
    /// <summary>
    /// 客户来源
    /// </summary>
    public long? CustomerSourceId { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系电话
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系电话字符长度不能超过32")]
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 电子邮箱
    /// </summary>
    [MaxLength(32, ErrorMessage = "电子邮箱字符长度不能超过32")]
    public string? Email { get; set; }
    
    /// <summary>
    /// 销售部门
    /// </summary>
    public long? OrganizationId { get; set; }
    
    /// <summary>
    /// 销售人员
    /// </summary>
    public long? UserManagementId { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? State { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>
    [MaxLength(100, ErrorMessage = "客户地址字符长度不能超过100")]
    public string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 账户名称
    /// </summary>
    [MaxLength(100, ErrorMessage = "账户名称字符长度不能超过100")]
    public string? AccountName { get; set; }
    
    /// <summary>
    /// 纳税人识别号
    /// </summary>
    [MaxLength(200, ErrorMessage = "纳税人识别号字符长度不能超过200")]
    public string? TaxpayerIdentificationNumber { get; set; }
    
    /// <summary>
    /// 银行账户
    /// </summary>
    [MaxLength(32, ErrorMessage = "银行账户字符长度不能超过32")]
    public string? BankAccount { get; set; }
    
    /// <summary>
    /// 开户银行
    /// </summary>
    [MaxLength(32, ErrorMessage = "开户银行字符长度不能超过32")]
    public string? BankDeposit { get; set; }
    
    /// <summary>
    /// 开户行地址
    /// </summary>
    [MaxLength(32, ErrorMessage = "开户行地址字符长度不能超过32")]
    public string? BankDepositAddrs { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [MaxLength(1000, ErrorMessage = "上传附件字符长度不能超过1000")]
    public string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 客户管理删除输入参数
/// </summary>
public class DeleteCustomermanagementInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 客户管理更新输入参数
/// </summary>
public class UpdateCustomermanagementInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 客户编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户编码字符长度不能超过32")]
    public string? CustomerCode { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "客户名称字符长度不能超过32")]
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 行业
    /// </summary>    
    public long? Industry { get; set; }
    
    /// <summary>
    /// 客户来源
    /// </summary>    
    public long? CustomerSourceId { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系电话
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系电话字符长度不能超过32")]
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 电子邮箱
    /// </summary>    
    [MaxLength(32, ErrorMessage = "电子邮箱字符长度不能超过32")]
    public string? Email { get; set; }
    
    /// <summary>
    /// 销售部门
    /// </summary>    
    public long? OrganizationId { get; set; }
    
    /// <summary>
    /// 销售人员
    /// </summary>    
    public long? UserManagementId { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>    
    public bool? State { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>    
    [MaxLength(100, ErrorMessage = "客户地址字符长度不能超过100")]
    public string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(200, ErrorMessage = "备注字符长度不能超过200")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 账户名称
    /// </summary>    
    [MaxLength(100, ErrorMessage = "账户名称字符长度不能超过100")]
    public string? AccountName { get; set; }
    
    /// <summary>
    /// 纳税人识别号
    /// </summary>    
    [MaxLength(200, ErrorMessage = "纳税人识别号字符长度不能超过200")]
    public string? TaxpayerIdentificationNumber { get; set; }
    
    /// <summary>
    /// 银行账户
    /// </summary>    
    [MaxLength(32, ErrorMessage = "银行账户字符长度不能超过32")]
    public string? BankAccount { get; set; }
    
    /// <summary>
    /// 开户银行
    /// </summary>    
    [MaxLength(32, ErrorMessage = "开户银行字符长度不能超过32")]
    public string? BankDeposit { get; set; }
    
    /// <summary>
    /// 开户行地址
    /// </summary>    
    [MaxLength(32, ErrorMessage = "开户行地址字符长度不能超过32")]
    public string? BankDepositAddrs { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>    
    [MaxLength(1000, ErrorMessage = "上传附件字符长度不能超过1000")]
    public string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 客户管理主键查询输入参数
/// </summary>
public class QueryByIdCustomermanagementInput : DeleteCustomermanagementInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataCustomermanagementInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 客户管理数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportCustomermanagementInput : BaseImportInput
{
    /// <summary>
    /// 客户编码
    /// </summary>
    [ImporterHeader(Name = "客户编码")]
    [ExporterHeader("客户编码", Format = "", Width = 25, IsBold = true)]
    public string? CustomerCode { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    [ImporterHeader(Name = "客户名称")]
    [ExporterHeader("客户名称", Format = "", Width = 25, IsBold = true)]
    public string? CustomerName { get; set; }
    
    /// <summary>
    /// 行业 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Industry { get; set; }
    
    /// <summary>
    /// 行业 文本
    /// </summary>
    [ImporterHeader(Name = "行业")]
    [ExporterHeader("行业", Format = "", Width = 25, IsBold = true)]
    public string IndustryFkDisplayName { get; set; }
    
    /// <summary>
    /// 客户来源 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? CustomerSourceId { get; set; }
    
    /// <summary>
    /// 客户来源 文本
    /// </summary>
    [ImporterHeader(Name = "客户来源")]
    [ExporterHeader("客户来源", Format = "", Width = 25, IsBold = true)]
    public string CustomerSourceFkDisplayName { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [ImporterHeader(Name = "联系人")]
    [ExporterHeader("联系人", Format = "", Width = 25, IsBold = true)]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系电话
    /// </summary>
    [ImporterHeader(Name = "联系电话")]
    [ExporterHeader("联系电话", Format = "", Width = 25, IsBold = true)]
    public string? ContactNumber { get; set; }
    
    /// <summary>
    /// 电子邮箱
    /// </summary>
    [ImporterHeader(Name = "电子邮箱")]
    [ExporterHeader("电子邮箱", Format = "", Width = 25, IsBold = true)]
    public string? Email { get; set; }
    
    /// <summary>
    /// 销售部门 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? OrganizationId { get; set; }
    
    /// <summary>
    /// 销售部门 文本
    /// </summary>
    [ImporterHeader(Name = "销售部门")]
    [ExporterHeader("销售部门", Format = "", Width = 25, IsBold = true)]
    public string OrganizationFkDisplayName { get; set; }
    
    /// <summary>
    /// 销售人员 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? UserManagementId { get; set; }
    
    /// <summary>
    /// 销售人员 文本
    /// </summary>
    [ImporterHeader(Name = "销售人员")]
    [ExporterHeader("销售人员", Format = "", Width = 25, IsBold = true)]
    public string UserManagementFkDisplayName { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "状态")]
    [ExporterHeader("状态", Format = "", Width = 25, IsBold = true)]
    public bool? State { get; set; }
    
    /// <summary>
    /// 客户地址
    /// </summary>
    [ImporterHeader(Name = "客户地址")]
    [ExporterHeader("客户地址", Format = "", Width = 25, IsBold = true)]
    public string? CustomerAddress { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 账户名称
    /// </summary>
    [ImporterHeader(Name = "账户名称")]
    [ExporterHeader("账户名称", Format = "", Width = 25, IsBold = true)]
    public string? AccountName { get; set; }
    
    /// <summary>
    /// 纳税人识别号
    /// </summary>
    [ImporterHeader(Name = "纳税人识别号")]
    [ExporterHeader("纳税人识别号", Format = "", Width = 25, IsBold = true)]
    public string? TaxpayerIdentificationNumber { get; set; }
    
    /// <summary>
    /// 银行账户
    /// </summary>
    [ImporterHeader(Name = "银行账户")]
    [ExporterHeader("银行账户", Format = "", Width = 25, IsBold = true)]
    public string? BankAccount { get; set; }
    
    /// <summary>
    /// 开户银行
    /// </summary>
    [ImporterHeader(Name = "开户银行")]
    [ExporterHeader("开户银行", Format = "", Width = 25, IsBold = true)]
    public string? BankDeposit { get; set; }
    
    /// <summary>
    /// 开户行地址
    /// </summary>
    [ImporterHeader(Name = "开户行地址")]
    [ExporterHeader("开户行地址", Format = "", Width = 25, IsBold = true)]
    public string? BankDepositAddrs { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [ImporterHeader(Name = "上传附件")]
    [ExporterHeader("上传附件", Format = "", Width = 25, IsBold = true)]
    public string? UploadAttachments { get; set; }
    
}
